<!DOCTYPE html>
<html lang="en">
<head>
          <meta charset="UTF-8">
          <meta name="viewport" content="width=device-width, initial-scale=1.0">
          <title>Document</title>
          <script>
                    var n1=window.prompt("请输入第一个加数");
                    var n2=window.prompt("请输入第二个加数");
                    var sum;
                    sum=parseInt(n1)+parseInt(n2);

                    alert("和是"+sum);
          </script>
</head>
<body>
          
</body>
</html>